home *** CD-ROM | disk | FTP | other *** search
/ World of Video / World of Video.iso / gfxprograms / 3dprograms / rayshade-4.0 / rayfiles / rsdefs / objects / jewels.rh < prev    next >
Text File  |  1995-02-13  |  4KB  |  126 lines

  1. /************************************************************************
  2.  *
  3.  *      jewels.rh
  4.  *
  5.  *      This is an #include file for the Rayshade Standard Header
  6.  *      Files.  It defines the "rounded" superprimitives in the package.
  7.  *
  8.  *      Please do not edit this file, or any of the other files in
  9.  *      this package!  Make additions to these in your own separate
  10.  *      file.  If you think you have something that should be added
  11.  *      permanently, please send it to Larry Coffin and/or David
  12.  *      DeBry (email addresses listed below).  If we include it in
  13.  *      the next release, we'll put your name in the contributor's
  14.  *      list.
  15.  *
  16.  *      Contributors (in alphabetical order):
  17.  *          Larry Coffin <lcoffin@clciris.chem.umr.edu>
  18.  *          David DeBry <ddebry@dsd.es.com>
  19.  */
  20.  
  21.  
  22. #ifndef RSHF_JEWELS
  23. #define RSHF_JEWELS
  24.  
  25. /*************************************************************************
  26.  *
  27.  */
  28.  
  29. #define RSPv0003_edge_y 1
  30. #define RSPv0003_edge_rad 2
  31. #define RSPv0003_tip_y 3
  32.  
  33. #define RSPjewel8pt(prefix,surf)                    \
  34. name RSPj8pt_face                            \
  35.     polygon    .4142    0    1                    \
  36.         1    0    .4142                    \
  37.         1    0    -.4142                    \
  38.         .4142    0    -1                    \
  39.         -.4142    0    -1                    \
  40.         -1    0    -.4142                    \
  41.         -1    0    .4142                    \
  42.         -.4142    0    1                    \
  43. name RSPj8pt_facets list                        \
  44.     triangle 1 0 .4142                        \
  45.          1 0 -.4142                        \
  46.          (RSPv0003_edge_rad) (RSPv0003_edge_y) 0        \
  47.     triangle 1 0 .4142                        \
  48.          (RSPv0003_edge_rad) (RSPv0003_edge_y) 0        \
  49.          (.7071 * RSPv0003_edge_rad)                \
  50.          (RSPv0003_edge_y)                    \
  51.          (.7071 * RSPv0003_edge_rad)                \
  52.     polygon    (RSPv0003_edge_rad) (RSPv0003_edge_y) 0            \
  53.         0 (RSPv0003_tip_y) 0                    \
  54.         (.7071 * RSPv0003_edge_rad)                \
  55.         (RSPv0003_edge_y)                    \
  56.         (.7071 * RSPv0003_edge_rad)                \
  57. end                                    \
  58. name RSPj8pt list                            \
  59.     object RSPj8pt_face                        \
  60.     object RSPj8pt_facets                        \
  61.     object RSPj8pt_facets                        \
  62.         rotate 0 -1 0 45                    \
  63.     object RSPj8pt_facets                        \
  64.         rotate 0 -1 0 90                    \
  65.     object RSPj8pt_facets                        \
  66.         rotate 0 -1 0 135                    \
  67.     object RSPj8pt_facets                        \
  68.         rotate 0 -1 0 180                    \
  69.     object RSPj8pt_facets                        \
  70.         rotate 0 -1 0 225                    \
  71.     object RSPj8pt_facets                        \
  72.         rotate 0 -1 0 270                    \
  73.     object RSPj8pt_facets                        \
  74.         rotate 0 -1 0 315                    \
  75. end                                    \
  76.     translate 0 (-RSPv0003_tip_y) 0                    \
  77.     scale (1/ RSPv0003_tip_y) (1/ RSPv0003_tip_y) (1/ RSPv0003_tip_y)    \
  78. prefix object surf RSPj8pt
  79.  
  80. #define RSPmounted_jewel8pt(prefix,jewel_surf,bracket_surf)        \
  81. RSPjewel8pt(name RSPm_jewel,)                        \
  82. name RSPbracket_arm union                        \
  83.     union                                \
  84.         sphere .15  1.6 .6 0                    \
  85.         list                            \
  86.             cylinder .15  1.6 .6 0  1.9 1.03 0        \
  87.             disc .15  1.6 .6 0   (1.6 - 1.9) (.6 - 1.03) 0    \
  88.             disc .15  1.9 1.03 0 (1.9 - 1.6) (1.03 - .6) 0    \
  89.         end                            \
  90.     end                                \
  91.     union                                \
  92.         sphere .15  1.9 1.03 0                    \
  93.         list                            \
  94.             cylinder .15  1.9 1.03 0  0 3.1 0        \
  95.             disc .15  1.9 1.03 0 (1.9) (1.03 - 3.1) 0    \
  96.             disc .15  0 3.1 0    (0 - 1.9) (3.1 - 1.03) 0    \
  97.         end                            \
  98.     end                                \
  99. end                                    \
  100.     rotate 0 -1 0 22.5                        \
  101. name RSPbracket difference                        \
  102.     list                                \
  103.         object RSPbracket_arm                    \
  104.         object RSPbracket_arm                    \
  105.             rotate 0 1 0 90                    \
  106.         object RSPbracket_arm                    \
  107.             rotate 0 1 0 180                \
  108.         object RSPbracket_arm                    \
  109.             rotate 0 1 0 -90                \
  110.         sphere .15  0 3.1 0                    \
  111.     end                                \
  112.         translate 0 (-RSPv0003_tip_y) 0                \
  113.         scale (1/ RSPv0003_tip_y)                    \
  114.           (1/ RSPv0003_tip_y)                     \
  115.           (1/ RSPv0003_tip_y)                    \
  116.     object RSPm_jewel                        \
  117. end                                    \
  118. name RSPmounted_8pt list                        \
  119.     object jewel_surf RSPm_jewel                    \
  120.     object bracket_surf RSPbracket                    \
  121. end                                    \
  122. prefix object RSPmounted_8pt                        \
  123.  
  124.  
  125. #endif RSHF_JEWELS
  126.